﻿<UserControl x:Class="KanbanBoard.Client.View.Views.TaskBoard.TaskBoardView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:my="clr-namespace:KanbanBoard.Client.View.Views.TaskBoard" xmlns:Converters="clr-namespace:KanbanBoard.Client.View.Converters" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../../Styles/TaskBoard.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
        <Converters:CommandConverter x:Key="CommandConverter" />
	</UserControl.Resources>

	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<Button Command="{Binding CreateNewTask, Converter={StaticResource CommandConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Margin="0,100,0,0">New Task</Button>

		<ItemsControl ItemsSource="{Binding Path=Columns}" Margin="20" Grid.Column="1">

			<ItemsControl.ItemsPanel>
				<ItemsPanelTemplate>
					<StackPanel Orientation="Horizontal" />
				</ItemsPanelTemplate>
			</ItemsControl.ItemsPanel>

			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<my:ColumnView />
				</DataTemplate>
			</ItemsControl.ItemTemplate>

		</ItemsControl>

	</Grid>
</UserControl>